From b815740789af63e2e2c531a2cd4d29bc8f598462 Mon Sep 17 00:00:00 2001 From: Sven Herzberg Date: Mon, 27 Mar 2006 23:01:59 +0000 Subject: [PATCH] reviewed by: Tim Janik 2006-03-28 Sven Herzberg reviewed by: Tim Janik * gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is called from gtk_pixmap_finalize (bug 336254) --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ gtk/gtkpixmap.c | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 40eb0f7797..cd7934b160 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-28 Sven Herzberg + + reviewed by: Tim Janik + + * gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if + the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is + called from gtk_pixmap_finalize (bug 336254) + 2006-03-27 Anders Carlsson * gdk/quartz/gdkevents-quartz.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 40eb0f7797..cd7934b160 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2006-03-28 Sven Herzberg + + reviewed by: Tim Janik + + * gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if + the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is + called from gtk_pixmap_finalize (bug 336254) + 2006-03-27 Anders Carlsson * gdk/quartz/gdkevents-quartz.c: diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c index e9680d2eb3..0b1d48261e 100644 --- a/gtk/gtkpixmap.c +++ b/gtk/gtkpixmap.c @@ -131,7 +131,8 @@ gtk_pixmap_set (GtkPixmap *pixmap, gint oldheight; g_return_if_fail (GTK_IS_PIXMAP (pixmap)); - g_return_if_fail (gdk_colormap_get_visual (gtk_widget_get_colormap (GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth (GDK_DRAWABLE (val))); + if(GDK_IS_DRAWABLE(val)) + g_return_if_fail (gdk_colormap_get_visual (gtk_widget_get_colormap (GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth (GDK_DRAWABLE (val))); if (pixmap->pixmap != val) { -- 2.30.2